﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace NLUNZ.Admin
{
    public partial class Admin : System.Web.UI.MasterPage
    {
        public List<SlideImage> ActiveSlideImages;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Context.User.Identity.IsAuthenticated)
            {
                lbSignOut.Text = " 登陆 ";
            }
            else
            {
                lbSignOut.Text = Context.User.Identity.Name + " 退出";
            }
            ActiveSlideImages = Repository.GetActiveSlideImages();

        }

        protected void lbSignOut_Click(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut();
            Response.Redirect("Login.aspx");
        }

        protected void btnEditSlideshow_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Admin/EditSlideshow.aspx");
        }
    }
}